<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        // window.alert("警告!");
        // document.write('hello,world!');

    </script>
</head>

<body>

    <div id="father">hello</div>
    <script>
        // Document对象
        document.getElementById('father').innerHTML = '你好，世界！';
        console.log('ok');

        var age = 25;
        var str = '字符串';
        window.alert(age);
        // 函数function
        function sum(x, y) {
            return x + y;
        }
        window.alert(sum(2, 3));
    </script>

</body>

</html>